#ifndef SANDBOX_SDK_MATH_VECTOR4_HPP
#define SANDBOX_SDK_MATH_VECTOR4_HPP

#include "vector4f.hpp"
#include "vector4i.hpp"
namespace sandbox
{
	namespace sdk
	{
		const Vector4f operator &(const Vector4f  a,const Vector4i  b)
		{return Vector4f((__m128)_mm_and_si128((__m128i)a.value,b.value));}
		const Vector4f operator &(const Vector4i  a,const Vector4f  b)
		{return Vector4f((__m128)_mm_and_si128(a.value,(__m128i)b.value));}
		const Vector4f nand      (const Vector4f  a,const Vector4i  b)
		{return Vector4f((__m128)_mm_nand_si128((__m128i)a.value,b.value));}
		const Vector4f nand      (const Vector4i  a,const Vector4f  b)
		{return Vector4f((__m128)_mm_nand_si128(a.value,(__m128i)b.value));}
		const Vector4f combine   (const Vector4f  a,const Vector4f  b, const Vector4i  c)
		{
			return Vector4f((__m128)_mm_or_si128(
			_mm_and_si128 ((__m128i)a.value,c.value),
			_mm_nand_si128((__m128i)b.value,c.value));
		}
		const Vector4i cvt(const Vector4f x)
		{
			return Vector4i(_mm_cvtps_epi32(x));
		}
		const Vector4f cvt(const Vector4i x)
		{
			return Vector4f(_mm_cvtepi32_ps(x));
		}
	}
}
#endif //SANDBOX_SDK_MATH_VECTOR4_HPP
